<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
    //   1.
         for(i=1;i<=35;i++){
            for(j=1;j<=35;j++){
                if((i+j==35)&&(i*2)+(j*4)==94){
                    document.write(`鸡有${i}只，兔子有${j}只`)
                  
                }
            }
         }
         document.write(`<br/>`)
// 2. 
for(var i=1;i<=35;i++){
    var j=35-i;
    if(i*2+j*4===94){
        document.write(`鸡有${i}只，兔子有${j}只`)
    }
}
    </script>
</body>
</html>